\section{coe\+\_\+emerg\+\_\+ring.\+c File Reference}
\label{coe__emerg__ring_8c}\index{coe\+\_\+emerg\+\_\+ring.\+c@{coe\+\_\+emerg\+\_\+ring.\+c}}


Ether\+C\+AT CoE emergency ring buffer methods.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+init} (\textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+t} $\ast$ring, \textbf{ ec\+\_\+slave\+\_\+config\+\_\+t} $\ast$sc)
\begin{DoxyCompactList}\small\item\em Emergency ring buffer constructor. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+clear} (\textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+t} $\ast$ring)
\begin{DoxyCompactList}\small\item\em Emergency ring buffer destructor. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+size} (\textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+t} $\ast$ring, size\+\_\+t size)
\begin{DoxyCompactList}\small\item\em Set the ring size. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+push} (\textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+t} $\ast$ring, const u8 $\ast$msg)
\begin{DoxyCompactList}\small\item\em Add a new emergency message. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+pop} (\textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+t} $\ast$ring, u8 $\ast$msg)
\begin{DoxyCompactList}\small\item\em Remove an emergency message from the ring. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+clear\+\_\+ring} (\textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+t} $\ast$ring)
\begin{DoxyCompactList}\small\item\em Clear the ring. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+overruns} (\textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+t} $\ast$ring)
\begin{DoxyCompactList}\small\item\em Read the number of overruns. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Ether\+C\+AT CoE emergency ring buffer methods. 



\subsection{Function Documentation}
\mbox{\label{coe__emerg__ring_8c_a47aeba0336dfc752903be4af5c7413ad}} 
\index{coe\+\_\+emerg\+\_\+ring.\+c@{coe\+\_\+emerg\+\_\+ring.\+c}!ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+init@{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+init}}
\index{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+init@{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+init}!coe\+\_\+emerg\+\_\+ring.\+c@{coe\+\_\+emerg\+\_\+ring.\+c}}
\subsubsection{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+init()}
{\footnotesize\ttfamily void ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+init (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+t} $\ast$}]{ring,  }\item[{\textbf{ ec\+\_\+slave\+\_\+config\+\_\+t} $\ast$}]{sc }\end{DoxyParamCaption})}



Emergency ring buffer constructor. 


\begin{DoxyParams}{Parameters}
{\em ring} & Emergency ring. \\
\hline
{\em sc} & Slave configuration. \\
\hline
\end{DoxyParams}


Definition at line 46 of file coe\+\_\+emerg\+\_\+ring.\+c.

\mbox{\label{coe__emerg__ring_8c_af7cc151e78f390fe9c3a12b73da6451d}} 
\index{coe\+\_\+emerg\+\_\+ring.\+c@{coe\+\_\+emerg\+\_\+ring.\+c}!ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+clear@{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+clear}}
\index{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+clear@{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+clear}!coe\+\_\+emerg\+\_\+ring.\+c@{coe\+\_\+emerg\+\_\+ring.\+c}}
\subsubsection{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+clear()}
{\footnotesize\ttfamily void ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+clear (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+t} $\ast$}]{ring }\end{DoxyParamCaption})}



Emergency ring buffer destructor. 


\begin{DoxyParams}{Parameters}
{\em ring} & Emergency ring. \\
\hline
\end{DoxyParams}


Definition at line 63 of file coe\+\_\+emerg\+\_\+ring.\+c.

\mbox{\label{coe__emerg__ring_8c_af7cb32cfafb48b4dfeb112a6e18885af}} 
\index{coe\+\_\+emerg\+\_\+ring.\+c@{coe\+\_\+emerg\+\_\+ring.\+c}!ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+size@{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+size}}
\index{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+size@{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+size}!coe\+\_\+emerg\+\_\+ring.\+c@{coe\+\_\+emerg\+\_\+ring.\+c}}
\subsubsection{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+size()}
{\footnotesize\ttfamily int ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+size (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+t} $\ast$}]{ring,  }\item[{size\+\_\+t}]{size }\end{DoxyParamCaption})}



Set the ring size. 

\begin{DoxyReturn}{Returns}
Zero on success, otherwise a negative error code. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em ring} & Emergency ring. \\
\hline
{\em size} & Maximum number of messages in the ring. \\
\hline
\end{DoxyParams}


Definition at line 78 of file coe\+\_\+emerg\+\_\+ring.\+c.

\mbox{\label{coe__emerg__ring_8c_a73171f530429590ca7f6ad324199c146}} 
\index{coe\+\_\+emerg\+\_\+ring.\+c@{coe\+\_\+emerg\+\_\+ring.\+c}!ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+push@{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+push}}
\index{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+push@{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+push}!coe\+\_\+emerg\+\_\+ring.\+c@{coe\+\_\+emerg\+\_\+ring.\+c}}
\subsubsection{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+push()}
{\footnotesize\ttfamily void ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+push (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+t} $\ast$}]{ring,  }\item[{const u8 $\ast$}]{msg }\end{DoxyParamCaption})}



Add a new emergency message. 


\begin{DoxyParams}{Parameters}
{\em ring} & Emergency ring. \\
\hline
{\em msg} & Emergency message. \\
\hline
\end{DoxyParams}


Definition at line 113 of file coe\+\_\+emerg\+\_\+ring.\+c.

\mbox{\label{coe__emerg__ring_8c_ab2da0f9ff8bdc6435eaa9ff40ec76f69}} 
\index{coe\+\_\+emerg\+\_\+ring.\+c@{coe\+\_\+emerg\+\_\+ring.\+c}!ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+pop@{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+pop}}
\index{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+pop@{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+pop}!coe\+\_\+emerg\+\_\+ring.\+c@{coe\+\_\+emerg\+\_\+ring.\+c}}
\subsubsection{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+pop()}
{\footnotesize\ttfamily int ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+pop (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+t} $\ast$}]{ring,  }\item[{u8 $\ast$}]{msg }\end{DoxyParamCaption})}



Remove an emergency message from the ring. 

\begin{DoxyReturn}{Returns}
Zero on success, otherwise a negative error code. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em ring} & Emergency ring. \\
\hline
{\em msg} & Memory to store the emergency message. \\
\hline
\end{DoxyParams}


Definition at line 135 of file coe\+\_\+emerg\+\_\+ring.\+c.

\mbox{\label{coe__emerg__ring_8c_acd2793534be712998dee14e016eeef25}} 
\index{coe\+\_\+emerg\+\_\+ring.\+c@{coe\+\_\+emerg\+\_\+ring.\+c}!ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+clear\+\_\+ring@{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+clear\+\_\+ring}}
\index{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+clear\+\_\+ring@{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+clear\+\_\+ring}!coe\+\_\+emerg\+\_\+ring.\+c@{coe\+\_\+emerg\+\_\+ring.\+c}}
\subsubsection{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+clear\+\_\+ring()}
{\footnotesize\ttfamily int ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+clear\+\_\+ring (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+t} $\ast$}]{ring }\end{DoxyParamCaption})}



Clear the ring. 

\begin{DoxyReturn}{Returns}
Zero on success, otherwise a negative error code. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em ring} & Emergency ring. \\
\hline
\end{DoxyParams}


Definition at line 155 of file coe\+\_\+emerg\+\_\+ring.\+c.

\mbox{\label{coe__emerg__ring_8c_a6a2389648c819d72d008dc5e7749d359}} 
\index{coe\+\_\+emerg\+\_\+ring.\+c@{coe\+\_\+emerg\+\_\+ring.\+c}!ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+overruns@{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+overruns}}
\index{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+overruns@{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+overruns}!coe\+\_\+emerg\+\_\+ring.\+c@{coe\+\_\+emerg\+\_\+ring.\+c}}
\subsubsection{ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+overruns()}
{\footnotesize\ttfamily int ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+overruns (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+coe\+\_\+emerg\+\_\+ring\+\_\+t} $\ast$}]{ring }\end{DoxyParamCaption})}



Read the number of overruns. 

\begin{DoxyReturn}{Returns}
Number of overruns. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em ring} & Emergency ring. \\
\hline
\end{DoxyParams}


Definition at line 170 of file coe\+\_\+emerg\+\_\+ring.\+c.

